<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="simplemde.min.css" rel="stylesheet">
    <script src="simplemde.min.js?v=13"></script>

</head>
<body>
<textarea id="ss" rows="4"></textarea>
</body>
<script>
    var simplemde = new SimpleMDE({ element: document.getElementById("ss"),autofocus: true,
        autosave: {
            enabled: true,
            uniqueId: "MyUniqueID",
            delay: 1000,
        },
        insertTexts: {
            horizontalRule: ["", "\n\n-----\n\n"],
            image: ["![](http://", ")"],
            link: ["[", "](http://)"],
            table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text      | Text     |\n\n"],
        },toolbar: ["bold","italic","strikethrough","heading-1","heading-2","heading-3","code","quote","unordered-list","ordered-list","link","image", "table","horizontal-rule","side-by-side","preview","fullscreen","|",{
                name: "custom1",
                action: function customFunction(editor){
                alert("复制")
                },
                className: "fa fa-search",
                title: "复制",
            },
            {
                name: "custom2",
                action: function customFunction(editor){
                    alert("复制")
                },
                className: "fa fa-smile-o",
                title: "复制",
            },
            {
                name: "custom3",
                action: function customFunction(editor){
                    alert("复制")
                },
                className: "fa fa-refresh",
                title: "复制",
            },
        ], });
    simplemde.value("- 测试");
</script>
</html>